/*************************************************************************
 * AUTHOR		 : Chris Hayes
 * STUDENT ID	 : 656960
 * ASSIGNMENT #5 : Multi-Dimensional Array - Tic Tac Toe
 * CLASS		 : CS1B
 * SECTION		 : MW12:30
 * DUE DATE		 : June 15, 2011
 *************************************************************************/

#include "tictacheader.h"

/**************************************************************************
 * TIC TAC TOE
 *
 *_________________________________________________________________________
 *
 * DESCRIPTION
 * 	This program is the children's game, TicTacToe.  It outputs the welcome
 * 	screen, followed by the instructions for the game.  It then prompts the
 * 	user for two players (one of which can be a computer) and then
 *
 *_________________________________________________________________________
 * 	INPUTS:
 *
 *  OUTPUTS:
 *
 *************************************************************************/


int main()
{
	string player1;						//Player 1 name	   -IN, OUT, & CALC
	string player2;						//Player 2 name	   -IN, OUT, & CALC
	int score1;							//score of player 1		-OUT & CALC
	int score2;							//score of player 2		-OUT & CALC
	int ties;							//Number of ties		-OUT & CALC
										//						-CALC
										// played				-OUT & CALC
	char keepPlaying;					//Option to keep playing-IN & CALC

	//Initializing scores
	score1 = 0;
	score2 = 0;
	ties = 0;

	//OUTPUT - welcome screen
	Welcome();

	//OUTPUT - instructions
	OutputInstruct();

	//INPUT - get two players
	GetPlayers(player1, player2);

	PlayGame(player1, score1, player2, score2, ties);

	keepPlaying = PlayAgain(player1, player2);


	while(keepPlaying == 'Y')
	{
		SwitchPlayers(player1, score1, player2, score2);

		PlayGame(player1, score1, player2, score2, ties);

		keepPlaying = PlayAgain(player1, player2);
	}

	cout << "\nThanks for playing my game!!\n\n";

	return 0;
}

